home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / falcon / falclib.lzh / EXAMPLE / FALCVID.S next >
Encoding:
Text File  |  1994-08-19  |  1.3 KB  |  66 lines

  1. *
  2. * This program will save the current screen mode as a Falcon Video file.
  3. *
  4.  
  5.         include    releasem.s
  6.         bra    main
  7.         include    shrtones.s
  8.         include    savefile.s
  9.         include    gemmacro.i
  10.         include    gem.s
  11.         
  12. filelength    equ    44
  13.     
  14.     
  15. main        fsel_exinput #path,#filen,#title    ; fileselector
  16.         bsr    @super
  17.         
  18.         lea    buffer,a1
  19.         move.l    #'FVDO',(a1)+    4 bytes header
  20.         move.b    $ff8006,(a1)+    monitor type
  21.         move.b    $ff820a,(a1)+    sync
  22.         move.l    $ff820e,(a1)+    offset & vwrap
  23.         move.w    $ff8266,(a1)+    spshift
  24.         move.l    #$ff8282,a0    horizontal control registers
  25. loop1        move    (a0)+,(a1)+
  26.         cmp.l    #$ff8292,a0
  27.         bne    loop1
  28.         move.l    #$ff82a2,a0    vertical control registers
  29. loop2        move    (a0)+,(a1)+
  30.         cmp.l    #$ff82ae,a0
  31.         bne    loop2
  32.         move    $ff82c2,(a1)+    video control
  33.         
  34.         bsr    @user
  35.  
  36.         moveq    #0,d0
  37.         move.b    path,d0
  38.         sub.b    #'A',d0
  39.         move    d0,-(sp)
  40.         @gemdos    $e,4        set drive
  41.         move.l    #path+150,a0
  42. search        cmp.b    #'\',-(a0)
  43.         bne    search
  44.         move.b    #0,(a0)
  45.         move.l    #path+2,-(sp)
  46.         @gemdos    $3b,6        change dir
  47.         move.l    #filen,a5
  48.         move.l    #buffer,a6
  49.         move.l    #filelength,d7
  50.         bsr    @savefile    save it
  51.         
  52.         bra    @quit
  53.     
  54.     
  55. path        dc.b    'C:\*.FV',0
  56.         ds.b    150
  57. title        dc.b    'Create a Falcon Video file',0
  58.  
  59.         include    aeslib.s
  60.         section    bss
  61.     
  62.         even
  63. buffer        ds.b    filelength
  64. filen        ds.b    50
  65.  
  66.